namespace Collaboris.Saf.Actions.Wss.Tests.Generated
{
    using Engine.Report;

    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using Saf.Tests;
    using Entities;
    using File;

    using SharePoint.Wss.Files;

    /// <summary>
    /// This test was originally generated but has now been tested and verfiied by MJ
    /// </summary>
    [TestClass]
    public class AddFileTest
    {

        [TestMethod]
        public void AddFile_Test()
        {
            WSSTestAssistant<AddFile, AddFileInfo> addfile =
                    new WSSTestAssistant<AddFile, AddFileInfo>(TestEnvironment.PublishingSite, "AddFileTestWeb", "BLANKINTERNET#0");

            using (addfile)
            {
                MacroReport doReport = addfile.DoMacro();

                Assert.IsNotNull(addfile.FirstEntity.FileUrl);
                Assert.IsTrue(
                    SPFileHelper.FileExists(
                        addfile.TestWeb, addfile.FirstEntity.FolderUrl, addfile.FirstEntity.FileName
                        ));


                MacroReport unDoReport = addfile.UndoMacro();

                Assert.IsFalse(
                    SPFileHelper.FileExists(
                        addfile.TestWeb, addfile.FirstEntity.FolderUrl, addfile.FirstEntity.FileName
                        ));
            }
        }

    }
}
